package com.fangcang.job.quartz.schedule;

import org.apache.log4j.Logger;
import org.joda.time.LocalDateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.fangcang.service.TraceLogService;

/**
 * spring schedule定时任务
 * 
 * @author fangcang
 * @date 2019年1月24日
 * @description
 */
@Component
@EnableScheduling
public class SpringTaskSchedule {
	private static final Logger logger = Logger.getLogger(SpringTaskSchedule.class);

	@SuppressWarnings("unused")
	@Autowired
	private TraceLogService logService;

	@Scheduled(cron = "0 0/10 * * * ?")
	public void executeTask() {
		logger.info("execute task SpringTaskSchedule  start" + LocalDateTime.now().toString());
//		logService.queryMerchantFailCount();
//		logService.queryMerchantCount();
		logger.info("execute task SpringTaskSchedule  end" + LocalDateTime.now().toString());
	}
}
